home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / ccfftf.z / ccfftf
Encoding:
Text File  |  2002-10-03  |  17.2 KB  |  331 lines

  1.  
  2.  
  3.  
  4. CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))                                                          CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CCCCCCCCFFFFFFFFTTTTFFFF, CCCCCCCCFFFFFFFFTTTTMMMMFFFF, CCCCCCCCFFFFFFFFTTTTMMMMRRRRFFFF, CCCCCCCCFFFFFFFFTTTT2222DDDDFFFF, CCCCCCCCFFFFFFFFTTTT3333DDDDFFFF, ZZZZZZZZFFFFFFFFTTTTFFFF, ZZZZZZZZFFFFFFFFTTTTMMMMFFFF, ZZZZZZZZFFFFFFFFTTTTMMMMRRRRFFFF,
  10.      ZZZZZZZZFFFFFFFFTTTT2222DDDDFFFF, ZZZZZZZZFFFFFFFFTTTT3333DDDDFFFF - Deallocate memory tacked on to the table array
  11.      during initialization
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      Single precision complex -> Single precision complex
  15.  
  16.           Fortran:
  17.                _i_s_t_a_t_u_s ==== CCCCCCCCFFFFFFFFTTTTFFFF ((((_n,,,, _t_a_b_l_e))))
  18.                _i_s_t_a_t_u_s ==== CCCCCCCCFFFFFFFFTTTTMMMMFFFF ((((_n,,,, _t_a_b_l_e))))
  19.                _i_s_t_a_t_u_s ==== CCCCCCCCFFFFFFFFTTTTMMMMRRRRFFFF ((((_n,,,, _t_a_b_l_e))))
  20.                _i_s_t_a_t_u_s ==== CCCCCCCCFFFFFFFFTTTT2222DDDDFFFF ((((_n_1,,,, _n_2,,,, _t_a_b_l_e))))
  21.                _i_s_t_a_t_u_s ==== CCCCCCCCFFFFFFFFTTTT3333DDDDFFFF ((((_n_1,,,, _n_2,,,, _n_3,,,, _t_a_b_l_e))))
  22.  
  23.           C/C++:
  24.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  25.                _i_s_t_a_t_u_s ==== ccccccccffffffffttttffff ((((iiiinnnntttt _n,,,, ffffllllooooaaaatttt *_t_a_b_l_e))));;;;
  26.                _i_s_t_a_t_u_s ==== ccccccccffffffffttttmmmmffff ((((iiiinnnntttt _n,,,, ffffllllooooaaaatttt *_t_a_b_l_e))));;;;
  27.                _i_s_t_a_t_u_s ==== ccccccccffffffffttttmmmmrrrrffff ((((iiiinnnntttt _n,,,, ffffllllooooaaaatttt *_t_a_b_l_e))));;;;
  28.                _i_s_t_a_t_u_s ==== ccccccccfffffffftttt2222ddddffff ((((iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ffffllllooooaaaatttt *_t_a_b_l_e))));;;;
  29.                _i_s_t_a_t_u_s ==== ccccccccfffffffftttt3333ddddffff ((((iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ffffllllooooaaaatttt *_t_a_b_l_e))));;;;
  30.  
  31.      Double precision complex -> Double precision complex
  32.  
  33.           Fortran:
  34.                _i_s_t_a_t_u_s ==== ZZZZZZZZFFFFFFFFTTTTFFFF ((((_n,,,, _t_a_b_l_e))))
  35.                _i_s_t_a_t_u_s ==== ZZZZZZZZFFFFFFFFTTTTMMMMFFFF ((((_n,,,, _t_a_b_l_e))))
  36.                _i_s_t_a_t_u_s ==== ZZZZZZZZFFFFFFFFTTTTMMMMRRRRFFFF ((((_n,,,, _t_a_b_l_e))))
  37.                _i_s_t_a_t_u_s ==== ZZZZZZZZFFFFFFFFTTTT2222DDDDFFFF ((((_n_1,,,, _n_2,,,, _t_a_b_l_e))))
  38.                _i_s_t_a_t_u_s ==== ZZZZZZZZFFFFFFFFTTTT3333DDDDFFFF ((((_n_1,,,, _n_2,,,, _n_3,,,, _t_a_b_l_e))))
  39.  
  40.           C/C++:
  41.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  42.                _i_s_t_a_t_u_s ==== zzzzzzzzffffffffttttffff ((((iiiinnnntttt _n,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e))));;;;
  43.                _i_s_t_a_t_u_s ==== zzzzzzzzffffffffttttmmmmffff ((((iiiinnnntttt _n,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e))));;;;
  44.                _i_s_t_a_t_u_s ==== zzzzzzzzffffffffttttmmmmrrrrffff ((((iiiinnnntttt _n,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e))));;;;
  45.                _i_s_t_a_t_u_s ==== zzzzzzzzfffffffftttt2222ddddffff ((((iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e))));;;;
  46.                _i_s_t_a_t_u_s ==== zzzzzzzzfffffffftttt3333ddddffff ((((iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e))));;;;
  47.  
  48. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  49.      These routines are part of the SCSL Scientific Library and can be loaded
  50.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  51.      directs the linker to use the multi-processor version of the library.
  52.  
  53.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  54.      4 bytes (32 bits). Another version of SCSL is available in which integers
  55.      are 8 bytes (64 bits).  This version allows the user access to larger
  56.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  57.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
  58.      only one of the two versions; 4-byte integer and 8-byte integer library
  59.      calls cannot be mixed.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))                                                          CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      The C and C++ prototypes shown above are appropriate for the 4-byte
  75.      integer version of SCSL. When using the 8-byte integer version, the
  76.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____fffffffftttt____iiii8888....hhhh>>>> header
  77.      file should be included.
  78.  
  79. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  80.      These routines deallocate memory added on to the _t_a_b_l_e array during
  81.      initialization if the first element of the _i_s_y_s array was set to 0 in the
  82.      call to CCCCCCCCFFFFFFFFTTTT(3S), CCCCCCCCFFFFFFFFTTTTMMMM(3S), CCCCCCCCFFFFFFFFTTTTMMMMRRRR((((3333SSSS)))), CCCCCCCCFFFFFFFFTTTT2222DDDD((((3333SSSS)))), CCCCCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS)))),,,,
  83.      ZZZZZZZZFFFFFFFFTTTT(3S), ZZZZZZZZFFFFFFFFTTTTMMMM(3S), ZZZZZZZZFFFFFFFFTTTTMMMMRRRR(3S), ZZZZZZZZFFFFFFFFTTTT2222DDDD(3S) or ZZZZZZZZFFFFFFFFTTTT3333DDDD(3S).  If the
  84.      appropriate one of these deallocation routines is not used, that memory
  85.      will leak, and repeated initializations using the same table array can
  86.      exhaust memory.  If the first element of the _i_s_y_s array was set to 1 in
  87.      the call to CCCCCCCCFFFFFFFFTTTT(3S), etc. (and this is the recommended value), there is
  88.      no potential memory leak and these routines do not need to be called. If
  89.      they are called, they will simply return 0.
  90.  
  91.      See the NOTES section of this man page for information about the
  92.      interpretation of the data types described in the following arguments.
  93.  
  94.      These routines have the following arguments:
  95.  
  96.      _i_s_t_a_t_u_s   Integer (result status). (output)
  97.                0 indicates the memory was successfully freed.  Non-zero
  98.                indicates that the memory was not freed because the transform
  99.                size did not match the supplied table array.
  100.  
  101.      _n         Integer.  (input)
  102.                Size of the one dimensional transform (the number of values in
  103.                the input array used to initialize table).  _n >= 0.
  104.  
  105.      _n_1        Integer.   (input)
  106.                Transform size in the first dimension.
  107.  
  108.      _n_2        Integer.   (input)
  109.                Transform size in the second dimension.
  110.  
  111.      _n_3        Integer.   (input)
  112.                Transform size in the third dimension.
  113.  
  114.      _t_a_b_l_e     Array of the following dimensions. (input)
  115.                CCCCCCCCFFFFFFFFTTTTFFFF: Single precision array of dimension (2*_n + _N_F).
  116.                ZZZZZZZZFFFFFFFFTTTTFFFF: Double precision array of dimension (2*_n + _N_F).
  117.                CCCCCCCCFFFFFFFFTTTTMMMMFFFF: Single precision array of dimension (2*_n + _N_F).
  118.                ZZZZZZZZFFFFFFFFTTTTMMMMFFFF: Double precision array of dimension (2*_n + _N_F).
  119.                CCCCCCCCFFFFFFFFTTTTMMMMRRRRFFFF: Single precision array of dimension (2*_n + _N_F).
  120.                ZZZZZZZZFFFFFFFFTTTTMMMMRRRRFFFF: Double precision array of dimension (2*_n + _N_F).
  121.                CCCCCCCCFFFFFFFFTTTT2222DDDDFFFF: Single precision array of dimension (2*_n_1 + _N_F) +
  122.                (2*_n_2 + _N_F).
  123.                ZZZZZZZZFFFFFFFFTTTT2222DDDDFFFF: Double precision array of dimension (2*_n_1 + _N_F) +
  124.                (2*_n_2 + _N_F).
  125.                CCCCCCCCFFFFFFFFTTTT3333DDDDFFFF: Single precision array of dimension (2*_n_1 + _N_F) +
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))                                                          CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))
  137.  
  138.  
  139.  
  140.                (2*_n_2 + _N_F) + (2*_n_3 + _N_F).
  141.                ZZZZZZZZFFFFFFFFTTTT3333DDDDFFFF: Double precision array of dimension (2*_n_1 + _N_F) +
  142.                (2*_n_2 + _N_F) + (2*_n_3 + _N_F).
  143.                Table of factors and roots of unity initialized by a call to
  144.                the corresponding routine (CCCCCCCCFFFFFFFFTTTT, CCCCCCCCFFFFFFFFTTTTMMMM, CCCCCCCCFFFFFFFFTTTTMMMMRRRR, CCCCCCCCFFFFFFFFTTTT2222DDDD,
  145.                CCCCCCCCFFFFFFFFTTTT3333DDDD, ZZZZZZZZFFFFFFFFTTTT, ZZZZZZZZFFFFFFFFTTTTMMMM, ZZZZZZZZFFFFFFFFTTTTMMMMRRRR, ZZZZZZZZFFFFFFFFTTTT2222DDDD, ZZZZZZZZFFFFFFFFTTTT3333DDDD).  _N_F = 30 if
  146.                table was initialized using _i_s_y_s((((0000))))=0.  _N_F=256 if _t_a_b_l_e was
  147.                initialized using _i_s_y_s((((0000))))=1.
  148.  
  149. NNNNOOOOTTTTEEEESSSS
  150.      The following data types are described in this documentation:
  151.  
  152.           TTTTeeeerrrrmmmm UUUUsssseeeedddd                     DDDDaaaattttaaaa ttttyyyyppppeeee
  153.  
  154.      Fortran:
  155.  
  156.           Array dimensioned 0000........_n----1111      XXXX((((0000::::nnnn----1111))))
  157.  
  158.           Array of dimensions (_m,_n)     XXXX((((mmmm,,,,nnnn))))
  159.  
  160.           Array of dimensions (_m,_n,_p)   XXXX((((mmmm,,,,nnnn,,,,pppp))))
  161.  
  162.           Integer                       IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  163.  
  164.           Single precision              RRRREEEEAAAALLLL
  165.  
  166.           Double precision              DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
  167.  
  168.           Single precision complex      CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  169.  
  170.           Double precision complex      DDDDOOOOUUUUBBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  171.  
  172.      C/C++:
  173.  
  174.           Array dimensioned 0000........_n----1111      xxxx[[[[_n]]]]
  175.  
  176.           Array of dimensions (_m,_n)     xxxx[[[[mmmm****nnnn]]]] oooorrrr xxxx[[[[nnnn]]]][[[[mmmm]]]]
  177.  
  178.           Array of dimensions (_m,_n,_p)   xxxx[[[[mmmm****nnnn****pppp]]]] oooorrrr xxxx[[[[pppp]]]][[[[nnnn]]]][[[[mmmm]]]]
  179.  
  180.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  181.  
  182.           Single precision              ffffllllooooaaaatttt
  183.  
  184.           Double precision              ddddoooouuuubbbblllleeee
  185.  
  186.           Single precision complex      ssssccccssssllll____ccccoooommmmpppplllleeeexxxx
  187.  
  188.           Double precision complex      ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))                                                          CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))
  203.  
  204.  
  205.  
  206. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  207.      Initialize the complex array table in preparation for doing an FFT of
  208.      size 1024. Take the FFT of _x and store the results in _y. Deallocate extra
  209.      memory tagged on to the table array.
  210.  
  211.           Fortran:
  212.  
  213.                !    This example uses isys(0) = 0. The recommended value
  214.                !    for current versions of SCSL is isys(0) = 1 which,
  215.                !    if used, will eliminate the need to call CCFFTF.
  216.                !
  217.                COMPLEX X(0:1023), Y(0:1023)
  218.                REAL TABLE(2*1024 + 30)  ! +30 too small for isys(0) = 1
  219.                REAL WORK(2*1024)
  220.                INTEGER ISYS(0:0)
  221.                INTEGER ISTATUS, CCFFTF
  222.                ISYS(0) = 0
  223.                CALL CCFFT(0, 1024, 0.0, DUMMY, DUMMY, TABLE, DUMMY, 0)
  224.                CALL CCFFT(1, 1024, 1.0, X, Y, TABLE, WORK, 0)
  225.                ISTATUS = CCFFTF(1024, TABLE)
  226.  
  227.  
  228.           C/C++:
  229.  
  230.           /* This example uses isys[0] = 0. The recommended value
  231.            * for current versions of SCSL is isys[0] = 1 which,
  232.            * if used, will eliminate the need to call ccfftf().
  233.            */
  234.           #include <scsl_fft.h>
  235.           scsl_complex x[1024], y[1024];
  236.           float table[2*1024 + 30];  /* +30 too small for isys[0] = 1*/
  237.           float work[2*1024];
  238.           int isys[1];
  239.           int istatus;
  240.           isys[0] = 0;
  241.           ccfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
  242.           ccfft(1, 1024, 1.0f, X, Y, table, work, isys);
  243.           istatus = ccfftf(1024, table);
  244.  
  245.  
  246.           C++ STL:
  247.  
  248.                // This example uses isys[0] = 0. The recommended value
  249.                // for current versions of SCSL is isys[0] = 1 which,
  250.                // if used, will eliminate the need to call ccfftf().
  251.                //
  252.                #include <complex.h>
  253.                #include <scsl_fft.h>
  254.                complex<float> x[1024], y[1024];
  255.                float table[2*1024 + 30];  // +30 too small for isys[0] = 1
  256.                float work[2*1024];
  257.                int isys[1];
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))                                                          CCCCCCCCFFFFFFFFTTTTFFFF((((3333SSSS))))
  269.  
  270.  
  271.  
  272.                int istatus;
  273.                isys[0] = 0;
  274.                ccfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
  275.                ccfft(1, 1024, 1.0f, X, Y, table, work, isys);
  276.                istatus = ccfftf(1024, table);
  277.  
  278.  
  279. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  280.      IIIINNNNTTTTRRRROOOO____FFFFFFFFTTTT(3S), IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S)
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                                                         PPPPaaaaggggeeee 5555
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.